#ifndef PLATFORM_H
#define PLATFORM_H

#include <string>
#include <list>
#include <global.h>
namespace NITK {
class ImageData {
public:
    virtual ~ImageData() {}
    std::string path;
    Size size;
};
class Image
{
public:
    Image(); // not implemented
    virtual ~Image(); // not implemented
    bool load(const std::string &path); // not implemented

    std::string path() const { return data->path; }
    Size size() const { return data->size; }
    UNIMPLEMENTED void render(const Rectangle &rectangle);
private:
    ImageData *data;
};

class Event;
class ApplicationEngine;
class RenderObject;
class PlatformData {
public:
    PlatformData() : applicationEngine(0) {}
    virtual ~PlatformData() {}
    ApplicationEngine *applicationEngine;
};

typedef void (*TimerCallback)(int id); // ### do I need the interval

class Platform
{
public:
    Platform(int &argc, char **argv);
    UNIMPLEMENTED int exec();
    UNIMPLEMENTED virtual ~Platform(); // not implemented
    UNIMPLEMENTED void update(RenderObject *object); // not implemented
    UNIMPLEMENTED void update(const Rectangle &rectangle); // not implemented
    UNIMPLEMENTED Size windowSize() const; // not implemented
    UNIMPLEMENTED void render(const Rectangle &rectangle, const Image *image); // not implemented
    UNIMPLEMENTED void render(const Rectangle &rectangle, unsigned int color); // not implemente
    UNIMPLEMENTED int startTimer(int interval, TimerCallback callBack);
    UNIMPLEMENTED bool stopTimer(int id);
    UNIMPLEMENTED std::list<int> timers() const;
    UNIMPLEMENTED int timerInterval(int timerId) const;

    static Platform *instance();
    void setApplicationEngine(ApplicationEngine *engine);
    ApplicationEngine *applicationEngine();
    bool sendEvent(Event *e);
private:
    UNIMPLEMENTED void init(int &argc, char **argv); // not implemented
    PlatformData *data;
};
};

#endif
